
c_args = ['-DSTM32F10X_HD', 'USE_STDPERIPH_DRIVER']
cm3_dev_inc = include_directories('Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/')
cm3_inc = include_directories('Libraries/CMSIS/CM3/CoreSupport/')
driver_inc = include_directories('Libraries/STM32F10x_StdPeriph_Driver/inc/')
mcuinc = include_directories('./')
mcu_sources = files(
   'Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c',
   'Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c',
 #'components/driver/gpio/gpio.c',
 #'components/log/log.c',
 #'Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/gcc_ride7/startup_stm32f10x_hd.s'
)
allinc = [
  cm3_dev_inc, cm3_inc, driver_inc,
  ]
libmcu = library('mcu-1.0',
  sources : [mcu_sources],
  c_args : c_args,
  include_directories : [allinc]
  )
libmcu_dep = declare_dependency(
  link_with : libmcu,
  include_directories : [allinc]
  )
